package com.hellobike.haxing.modules.wms.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hellobike.haxing.modules.wms.entity.Container;
import com.hellobike.haxing.modules.wms.mapper.ContainerMapper;
import com.hellobike.haxing.modules.wms.service.IContainerService;
import org.springframework.stereotype.Service;

/**
 * @Description: t_wms_container
 * @Author: haxing-boot
 * @Date:   2020-01-15
 * @Version: V1.0
 */
@Service
public class ContainerServiceImpl extends ServiceImpl<ContainerMapper, Container> implements IContainerService {

    @Override
    public Container getByCode(String boxCode,Long warehouseId) {
        Container q = new Container();
        q.setContainerCode(boxCode);
        q.setWarehouseId(warehouseId);
        QueryWrapper<Container> queryWrapper = new QueryWrapper<>(q);
        return baseMapper.selectOne(queryWrapper);
    }
}
